package chapter13.h13_3;

import chapter13.Element;
import chapter13.Entry;
import chapter13.Visitor;

import java.util.ArrayList;
import java.util.Iterator;

public class ElementArrayList extends ArrayList<Entry> implements Element {

    @Override
    public void accept(Visitor v) {
        Iterator<Entry> it = iterator();
        while(it.hasNext()){
            Entry entry = it.next();
            entry.accept(v);
        }
    }
}
